/*
 * engine.h
 *
 *  Created on: Mar 30, 2012
 *      Author: The Almighty Eric
 */

#ifndef ENGINE_H
#define ENGINE_H

#include <string>
#include "SDL.h"
#include "SDL_image.h"
#include "SDL_ttf.h"
#include "SDL_mixer.h"

class engine
{
public:

	enum state
	{
		main, //main menu
		mainn, //new game
		mainc, //continue
		game, //normal game interaction
		gamem, //ingame menu interaction
		paused //paused
	};

	//Variables
	bool quit;
	state s;
	Mix_Music *audio;
	SDL_Event event;
	SDL_Surface *background;
	SDL_Surface *screen;

	engine();
	bool Init();
	int getState();
	void setState(int i);
	void apply_surface(int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip);
	SDL_Surface *load_image(std::string filename);
	bool CollisionCheck(SDL_Rect A, SDL_Rect B);

};

#endif
